package com.offcn.user.mapper;
import com.offcn.user.pojo.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import feign.Param;
import org.apache.ibatis.annotations.Update;

/****
 * @Author:ujiuye
 * @Description:User的Dao
 * @Date 2021/2/1 14:19
 *****/
public interface UserMapper extends BaseMapper<User> {


    /**
     * 添加用户积分
     *
     * @param username 用户名
     * @param points   点
     * @return int
     */
    @Update("UPDATE tb_user SET points=points+#{points} WHERE  username=#{username}")
    int addUserPoints(@Param("username") String username, @Param("points") Integer points);
}
